package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    @Select("select * from nursing_plan")
    List<NursingPlanVO> getAllPlan();

    void addPlan(NursingPlan pojo);


    Page<NursingPlanVO> list(String name, Integer status);

    @Select("select * from nursing_plan where id = #{id}")
    NursingPlanVO getById(Integer id);

    void updatePlan(NursingPlan nursingPlan);

    @Delete("delete from nursing_plan where id = #{id}")
    void delete(Integer id);

    @Update("update nursing_plan set status =#{status} where id =#{id}")
    void updateStatus(Integer id, Integer status);
}
